﻿using System;
using System.Text;
using System.IO;
using System.Collections;
using System.Collections.Generic;
namespace Tssipl.PaymentAdapter.Core
{
    public  class Field
    {
        private String _tag;
        private String _value;

        public Field(String Tag, String Value)
        {
            _tag = Tag;
            _value = Value;
        }


        /** Retrieves the tag for the field without the curly braces.
         * 
         * @return the tag for the field.
         */
        public String getTag()
        {
            return _tag;
        }


        /** Retrieves the value for the field.
         * 
         * @return the value.
         */
        public String getValue()
        {
            return _value;
        }


        /** Retrieves the field formatted correctly.
         * 
         * @return the formatted field.
         */
       // public abstract String getFormattedField();
        public  String getFormattedField()
        {
            return ":" + getTag() + ":" + getValue();
        }

        /** Retrieves the field formatted correctly.
         * 
         * @return the formatted field.
         */
        //HACK @Override
        //  public  String toString()
        public override string ToString()
        {
            return getFormattedField();
        }
    }
}